package com.ren.mianshi.http2.retrofit.interceptor;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by ren on 2017/11/27.
 *
 */

public class ImageInterceprot implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = handlerRequest(chain.request());
        return chain.proceed(request);
    }

    private Request handlerRequest(Request request) {
        Request newRequest = request.newBuilder().addHeader("Content-Type", "image/jpeg").build();
        return newRequest;

    }
}
